/**
 * @file bsp_speaker_handler.h
 * @author liufeng (liufeng@injoinic.com)
 * @brief wt588F02B语音模块handler
 * @version 0.1
 * @date 2024-12-13
 *
 * @copyright Copyright (c) 2024  injoinic
 *
 */

#ifndef __BSP_SPEAKER_HANDLER_H__
#define __BSP_SPEAKER_HANDLER_H__

#include "FreeRTOS.h"
#include "bsp_linklist.h"
#include "bsp_speaker_driver.h"
#include "main.h"
#include "queue.h"
#include "task.h"

typedef struct
{
    wt588_driver_typedef* wt588_driver; // wt588底层驱动
    list_handler priority_list;         // 邻接表
    QueueHandle_t voice_add_queue;      // 待添加语音的消息队列
    QueueHandle_t voice_executor_queue; // 待播放语音的消息队列
    QueueHandle_t voice_detect_queue;   // 待检测播放完成
    QueueHandle_t voice_finish_queue;   // 已播放完毕语音的消息队列
} spk_handler_typedef;

extern spk_handler_typedef spk_handler;
extern void spk_handler_task();

#endif /* __BSP_SPEAKER_HANDLER_H__ */
